<template>
  <el-dialog :show-close=false
             :close-on-press-escape=false
             :close-on-click-modal=false
             :title="$getTextByLangKey('编辑产线计数器配置')"
             :visible.sync="dialogVisible"
             @keyup.enter.native="confrimDialog">
    <el-row>
      <el-col :span="12">

        <el-form class="el-form-left" label-position="left" label-width="82px" :model="formData">
          <el-form-item
            :label="$getTextByLangKey('计数器编码')+'：'"
          >
            <el-input v-model="formData.mac"></el-input>
          </el-form-item>
        </el-form>
      </el-col>

    </el-row>



    <el-row>

      <el-col :span="12">

        <el-form class="el-form-left" label-position="left" label-width="82px" :model="formData">
          <!--<el-form-item label="计划产出：">-->
          <!--<el-input v-model="excelForm.lineName" :disabled="true"></el-input>-->
          <!--</el-form-item>-->
            <el-form-item
              :label="$getTextByLangKey('备注')+'：'"
            >
            <el-input v-model="formData.note"></el-input>
          </el-form-item>

        </el-form>
      </el-col>
    </el-row>

    <el-row>

      <el-col :span="12">

        <el-form class="el-form-left" label-position="left" label-width="82px" :model="formData">
          <!--<el-form-item label="计划产出：">-->
          <!--<el-input v-model="excelForm.lineName" :disabled="true"></el-input>-->
          <!--</el-form-item>-->
          <el-form-item
            :label="$getTextByLangKey('拼板数')+'：'"
          >
            <el-input v-model="formData.boardNum"></el-input>
          </el-form-item>

        </el-form>
      </el-col>
    </el-row>

    <span slot="footer" class="dialog-footer">
        <el-button @click="cancelDialog">{{$getTextByLangKey('取消')}}</el-button>
        <el-button type="primary" @click="confrimDialog">{{$getTextByLangKey('确定')}}</el-button>
      </span>
  </el-dialog>
</template>
<script>

  // import Request from '@/common/js/Request'
  import util from '@/common/js/util'

  export default {
    name: "search-action-componet",
    props: ['dialogVisible','formData','rowIndex'],
    data() {
      return {

//        formData: {
//          designedOutput: '',//计划产出
//          note: '',//备注
//        },
      }
    },
    created: function () {

    },
    methods: {

      creatDialog: function () {
//        this.dialogVisible = true;

      },
      cancelDialog: function () {
//        this.dialogVisible = false;
        console.log(this.formData)
        this.$emit('cancelDialog')
      },
      confrimDialog: function () {
//        this.dialogVisible = false;
        if(this.formData.boardNum<=0||isNaN(this.formData.boardNum)){
          util.showErrorToast('拼板数必须大于0')
        }else{
          this.$emit('confrimDialog', this.formData,this.rowIndex)
        }

      }
    }
  }

</script>

<style >

  /*.div-search-action {*/
    /*line-height: 50px;*/

  /*}*/

  /deep/ label.el-form-item__label{
    width: 100px !important;
  }

  /deep/ .el-form-item__content{
    margin-left: 100px !important;
  }

  /deep/ .first-el-select{
    padding-left: 10px;
  }
  /deep/ .el-button-delete-data{
    margin-left: 10px;
  }
  .el-dialog__body {
    padding-top: 10px;
    padding-bottom: 0px;
  }

  .el-dialog__footer {
    padding-top: 0px;
  }

  .el-form-left {
    margin-right: 10px;
  }

  .el-form-right {
    margin-left: 10px;
  }
</style>
